
function newHandsontable(hotElement, dataObject)
{
  var hotSettings = {
    data: dataObject,
    columns: [
      {
        data: 'Name',
        type: 'text'
      },
      {
        data: 'Value',
        type: 'numeric',
        numericFormat: {
          pattern: '0.00'
        }
      },
      {
        data: 'Quantity',
        type: 'numeric'
      },
      {
        data: 'Factory',
        type: 'text'
      }
    ],
    stretchH: 'all',
    width: 805,
    autoWrapRow: true,
    height: 487,
    maxRows: 22,
    manualRowResize: true,
    manualColumnResize: true,
    rowHeaders: true,
    colHeaders: [
      '名称',
      '单价(人名币)',
      '数量',
      '生产基地'
    ],
    manualRowMove: true,
    manualColumnMove: true,
    contextMenu: true,
    filters: true,
    dropdownMenu: true,
    licenseKey: 'non-commercial-and-evaluation' // handsontable free LIC 
  };

  var hot = new Handsontable(hotElement, hotSettings);
}
